<%@ page import="com.future.Task" %>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
  <meta name="layout" content="main"/>
  <g:set var="entityName" value="${message(code: 'task.label', default: 'Task')}"/>
  <title><g:message code="default.show.label" args="[entityName]"/></title>
</head>
<body>

<div class="body" style="width:100%;text-align:center">
  <div class="nav">
    <span class="menuButton"><a class="home" href="${createLink(uri: '/')}">Home</a></span>
    <span class="menuButton"><g:link class="list" action="list"><g:message code="default.list.label" args="[entityName]"/></g:link></span>
    <span class="menuButton"><g:link class="create" action="create"><g:message code="default.new.label" args="[entityName]"/></g:link></span>
  </div>
  <h1><g:message code="default.show.info" args="[taskInstance?.id,taskInstance?.taskName]"/><div class="author">author:${taskInstance?.user?.userName}</div></h1>
  <g:if test="${flash.message}">
    <div class="message">${flash.message}</div>
  </g:if>
  <div class="dialog" style="width:100%">
    <table width="70%" align="center">
      <tr>
        <th colspan="4" style="text-align:left" valign="top" scope="col">::</th>
      </tr>
      <tr>
        <td class="name">Task编号</td>
        <td class="value">${fieldValue(bean: taskInstance, field: "taskSerialNumber")}</td>
        <td class="name">Task创建日期</td>
        <td class="value">${fieldValue(bean: taskInstance, field: "dateCreated")}</td>
      </tr>
      <tr>
        <td class="name">Task开始日期</td>
        <td class="value"><g:if test="${taskInstance?.taskPlanBeginDate==null}"><a href="${createLink(action:'beginTask',id:taskInstance.id)}">开始项目</a> </g:if><g:formatDate date="${taskInstance?.taskPlanBeginDate}"/></td>
        <td class="name">Task结束日期</td>
        <td class="value"><g:if test="${taskInstance?.taskPlanCompleteDate==null}"><a href="${createLink(action:'completeTask',id:taskInstance.id)}">结束项目</a> </g:if><g:formatDate date="${taskInstance?.taskPlanCompleteDate}"/></td>
      </tr>
      <tr>
        <td class="name">Task计划周期</td>
        <td class="value">${fieldValue(bean: taskInstance, field: "taskPlanCycle")}</td>
        <td class="name">Task实际周期</td>
        <td class="value"><g:getTime date="${taskInstance.taskFactCycle}"></g:getTime> </td>
      </tr>
      <tr>
        <td class="name" colspan="4">【Task 进行时间分布图（时间安排计划分布图）】<input style="height:20px;" type="button" onclick="window.location.href('${createLink(action:'googleCalendar',id:taskInstance.id)}')" value="添加"/><label><a target="_blank" href="http://www.google.com/calendar/renderOnline?hl=zh-CN"><img src="http://www.google.com/calendar/images/calendar_plus_zh_CN.gif"></a></label></td>
      </tr>
      <tr>
        <td class="value" colspan="4">
          <table width="100%">
            <tr>
              <td class="value">
                <div style="width:850px;OVERFLOW-X:auto;OVERFLOW-Y:hidden;SCROLLBAR-FACE-COLOR:#ffffff;FONT-SIZE:11px;PADDING-BOTTOM:15px;SCROLLBAR-HIGHLIGHT-COLOR:#ffffff;OVERFLOW:auto;SCROLLBAR-SHADOW-COLOR:#919192;COLOR:#006600;SCROLLBAR-3DLIGHT-COLOR:#ffffff;LINE-HEIGHT:100%;SCROLLBAR-ARROW-COLOR:#919192;PADDING-TOP:0px;SCROLLBAR-TRACK-COLOR:#ffffff;FONT-FAMILY:'宋体';SCROLLBAR-DARKSHADOW-COLOR:#ffffff;LETTER-SPACING:1pt;TEXT-ALIGN:left;word-break:keep-all;">
                  ${taskInstance.googleCalendar}
                  %{--<table>--}%
                    %{--<tr>--}%
                      %{--<td></td>--}%
                      %{--<g:each var="i" in="${(0..<100)}">--}%
                        %{--<td style="word-break:keep-all;">2009.01.09</td>--}%
                      %{--</g:each>--}%
                    %{--</tr>--}%
                    %{--<g:each var="hour" in="${0..<24}">--}%
                      %{--<tr>--}%
                        %{--<td>${hour}</td>--}%
                        %{--<g:each var="i" in="${(0..<100)}">--}%
                          %{--<td class="value">我干了什么</td>--}%
                        %{--</g:each>--}%
                      %{--</tr>--}%
                    %{--</g:each>--}%
                  %{--</table>--}%
                </div>
              </td>
            </tr>
          </table>
        </td>
      </tr>
      <tr>
        <td class="name" colspan="4">【Task任务 目的&amp;想法&amp;灵感】<input style="height:20px;" type="button" onclick="window.location.href('${createLink(action:'taskInfo',id:taskInstance.id)}')" value="添加"/></td>
      </tr>
      <tr>
        <td class="value" colspan="4">
          <table width="100%">
            <tr>
              <td class="value">
                <div class="show_table">
                  ${fieldValue(bean: taskInstance, field: "taskInfo").decodeHTML()}
                </div>
              </td>
            </tr>
          </table>
        </td>
      </tr>
      <tr>
        <td class="name" colspan="4">【Task任务 要求技术点】<input style="height:20px;" type="button" onclick="window.location.href('${createLink(action:'taskThink',id:taskInstance.id)}')" value="添加"/></td>
      </tr>
      <tr>
        <td class="value" colspan="4">
          <table width="100%">
            <tr>
              <td class="value">
                <div class="show_table">
                  ${fieldValue(bean: taskInstance, field: "taskThink").decodeHTML()}
                </div>
              </td>
            </tr>
          </table>

        </td>
      </tr>
      <tr>
        <td class="name" colspan="4">【Task任务 功能列表】<input style="height:20px;" type="button" onclick="window.location.href('${createLink(action:'functionList',id:taskInstance.id)}')" value="添加"/></td>
      </tr>
      <tr>
        <td class="value" colspan="4">
          <table width="100%">
            <tr>
              <td class="value">
                <div class="show_table">
                  ${fieldValue(bean: taskInstance, field: "functionList").decodeHTML()}
                </div>
              </td>
            </tr>
          </table>
        </td>
      </tr>
      <tr>
        <td class="name" colspan="4">【Task任务 遇到的困难及解决方法】<input style="height:20px;" type="button" onclick="window.location.href('${createLink(action:'taskUpgrade',id:taskInstance.id)}')" value="添加"/></td>
      </tr>
      <tr>
        <td class="value" colspan="4">
          <table width="100%">
            <tr>
              <td class="value">
                <div class="show_table">
                  ${fieldValue(bean: taskInstance, field: "taskUpgrade").decodeHTML()}
                </div>
              </td>
            </tr>
          </table>
        </td>
      </tr>
      <tr>
        <td class="name">【Task任务 关联项目】</td>
        <td class="value" colspan="3"><g:link controller="task" action="show" id="${taskInstance?.taskRelationship?.id}">${taskInstance?.taskRelationship?.taskName.encodeAsHTML()}</g:link></td>
      </tr>
      <tr>
        <td class="name" colspan="4">【个人对Task任务 的评价】<input style="height:20px;" type="button" onclick="window.location.href('${createLink(action:'personalEvaluation',id:taskInstance.id)}')" value="添加"/></td>
      </tr>
      <tr>
        <td class="value" colspan="4">
          <table class="" width="100%">
            <tr>
              <td class="value">
                <div class="show_table">
                  ${fieldValue(bean: taskInstance, field: "personalEvaluation").decodeHTML()}
                </div>
              </td>
            </tr>
          </table>
        </td>
      </tr>
      <tr>
        <td class="name" colspan="4">【其他用户的评论】</td>
      </tr>
      <tr>
        <td class="value" colspan="4">
          <table class="" style="width:100%">
            <g:each var="evaluation" in="${taskInstance?.othersEvaluation}">
              <tr class="prop">
                <td class="name"><g:message code="evaluation.name" default="匿名"/>的评论:<::${evaluation?.dateCreated}> <div style="text-align:right">ip:<g:getIp/></div></td>
              </tr>
              <tr class="prop">
                <td class="value">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;${evaluation?.evaluation}</td>
              </tr>
            </g:each>
          </table>
        </td>
      </tr>
    </table>

  </div>
  <div class="buttons" style="width:70%;text-align:center">
    <g:form>
      <g:hiddenField name="id" value="${taskInstance?.id}"/>
      <span class="button"><g:actionSubmit class="edit" action="edit" value="${message(code: 'default.button.edit.label', default: 'Edit')}"/></span>
      <span class="button"><g:actionSubmit class="delete" action="delete" value="${message(code: 'default.button.delete.label', default: 'Delete')}" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');"/></span>
    </g:form>
    <g:form controller="evaluation">
      <span class="button"><g:actionSubmit class="create" action="create" value="添加评论"/></span>
    </g:form>
  </div>
</div>
</body>
</html>
